<template>
  <view class="sign-date-card">
    <view :class="['card', isSigned ? 'signed' : '']">
      <text class="score"> +{{ score }} </text>
      <text v-if="!isSigned" class="date">
        {{ date }}
      </text>
      <view v-else class="isSignIn" />
    </view>
  </view>
</template>
<script setup>
import { ref, defineProps } from "vue";

const props = defineProps({
  date: {
    type: String,
    default: "",
  },
  isSigned: {
    type: Boolean,
    default: false,
  },
});
const score = ref(1);
</script>

<style lang="less" scoped>
.sign-date-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  width: 83rpx;

  .card,
  .signed {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 83rpx;
    height: 117rpx;
    border-radius: 16rpx;
    background-color: @color-lightly-grey;
    font-family: "ali-p";
    .date {
      margin-top: 12rpx;
      font-size: 23rpx;
      color: @color-grey;
    }
    .isSignIn {
      margin-top: 12rpx;
      width: 31rpx;
      height: 31rpx;
      background: @is-sign-icon;
      background-size: 31rpx 31rpx;
    }
  }
  .signed {
    background-color: @color-light-blue;
  }
}
</style>